package com.syni.mdd.sjb.community.base.controller.protect.mddDataBank;

import com.syni.mdd.sjb.community.base.entity.vo.BaseRqVo;
import com.syni.mdd.sjb.community.base.service.WxCommunityPersonService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/community")
@Log4j2
public class CommunityManagementController {

    @Autowired
    WxCommunityPersonService wxCommunityPersonService;

    //@CheckUserIdentity
    @ApiOperation(value = "群列表")
    @PostMapping(value = "/managementList")
    public Map<String,Object> managementList(@RequestBody BaseRqVo baseRqVo) {
        Integer userId = baseRqVo.getUserId();
        return wxCommunityPersonService.managementList(userId,baseRqVo.getPageNum(),baseRqVo.getPageSize());
    }
}
